const http = require('http');

function createServer() {
  const server = http.createServer((req, res) => {
    res.end('2');
  });
  server.on('clientError', (err, socket) => {
    socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
  });
  server.listen(9002);
  console.log('http://127.0.0.1:9002')
}

createServer()